                <div id="content" class="span10">
                    <!-- content starts -->
                    <div class="row-fluid sortable">
                        <div class="box span12">
                            <div class="box-content">
                                <?php if(!empty($detail)){
                                    foreach ($detail as $row){
                                    ?>
                                <form class="form-horizontal" action="<?php echo base_url();?>akv/update" method="post">
                                  <fieldset>
                                    <legend>Ubah Detail Aktiva</legend>
                                    <div class="row-fluid">
                                        <div class="span6">
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Nomor Aktiva</label>
                                                <div class="controls">
                                                    <input type="hidden" class="span6 typeahead" id="typeahead" name="no_penjualan" id="no_penjualan" value="<?=$row['id_aktiva']?>">
                                                    <input type="text" class="span8 typeahead" name="no_penjualan" id="no_penjualan" value="<?=$row['id_aktiva']?>" readonly="true">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Nama Aktiva</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="nama" id="nama" value="<?=$row['nama']?>">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Keterangan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="keterangan" id="keterangan" value="<?=$row['keterangan']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Harga Perolehan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="harga_perolehan" id="harga_perolehan" value="<?=$row['harga_perolehan']?>">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="span6">
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Nilai Residu</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="nilai_residu" id="nilai_residu" value="<?=$row['nilai_residu']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Umur Ekonomis</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="umur_ekonomis" id="umur_ekonomis" value="<?=$row['umur_ekonomis']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Cabang</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="cabang" id="cabang" value="<?=$row['cabang']?>">
                                                </div>
                                            </div>
                                        </div>
                                        
                                    </div>
                                    <div class="form-actions">
                                        <button type="submit" class="btn btn-primary">Submit</button>
                                        <a type="reset" class="btn" href="<?php echo base_url() ?>akv">Cancel</a>
                                    </div>
                                    </fieldset>
                                </form>
								
                                <?php }}else {?>
								
								<form class="form-horizontal" action="<?php echo base_url();?>penj/insert" method="post">
                                  <fieldset>
                                    <legend>Menambah Penjualan Baru</legend>
                                    <div class="row-fluid">
                                        <div class="span6">
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Nomer Penjualan</label>
                                                <div class="controls">
                                                    <input type="hidden" class="span6 typeahead" id="typeahead" name="id_penjualan" id="no_penjualan" >
                                                    <input type="text" class="span8 typeahead" name="no_penjualan" value="<? echo $no_penjualan; ?>" readonly="true" id="no_penjualan"  >
                                                </div>
                                            </div>
											
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Nomer Pengiriman</label>
                                               <div class="controls">
											   <select id="no_pengiriman" name="no_pengiriman" data-rel="chosen">
                                                       
                                                        <optgroup label="Nomer Pengiriman">
                                                        <?php foreach ($pengiriman as $kat){
                                                            echo '<option value="'.$kat['no_pengiriman'].'">'.$kat['no_pengiriman'].'</option>';
                                                        }?>
                                                        </optgroup>
                                                    </select>
													</div>
                                            </div>
											
											<!--
											
											
                                           <div class="control-group">
                                                <label class="control-label" for="typeahead">Nama Pelanggan</label>
                                               <div class="controls">
											   <select id="id_konsumen" name="konsumen" data-rel="chosen">
                                                       
                                                        <optgroup label="Konsumen">
                                                        <?php foreach ($pelanggan as $kat){
                                                            echo '<option value="'.$kat['id_konsumen'].'">'.$kat['nama'].'</option>';
                                                        }?>
                                                        </optgroup>
                                                    </select>
													</div>
                                            </div>
											
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Karyawan</label>
                                               <div class="controls">
											   <select id="id_karyawan" name="karyawan" data-rel="chosen">
                                                       
                                                        <optgroup label="Karyawan">
                                                        <?php foreach ($karyawan as $kat){
                                                            echo '<option value="'.$kat['id_karyawan'].'">'.$kat['nama'].'</option>';
                                                        }?>
                                                        </optgroup>
                                                    </select>
													</div>
                                            </div>
											
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Jenis Barang</label>
                                                <div class="controls">
											   <select id="jenis_barang" name="jenis_barang" data-rel="chosen">
                                                       
                                                        <optgroup label="Jenis Barang">
                                                        <?php foreach ($barang as $kat){
                                                            echo '<option value="'.$kat['id_barang'].'">'.$kat['nama'].'</option>';
                                                        }?>
                                                        </optgroup>
                                                    </select>
													</div>
													
                                            </div>
											-->
											
                                        </div>
                                        <div class="span6">
										<!--
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Jenis Pembayaran</label>
                                                <div class="controls">
											   <select id="jenis_pembayaran" name="jenis_pembayaran" data-rel="chosen">
                                                       
                                                        <optgroup label="Jenis Pembayaran">
                                                        <option value="1"> Tunai</option>
														 <option value="2"> Kredit</option>
														  <option value="3"> Kredit Khusus</option>
                                                        </optgroup>
                                                    </select>
													</div>
                                            </div>
											-->
											<!--
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Angsuran</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="angsuran" id="umur_ekonomis" >
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Kuantitas</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="kuantitas" id="cabang" >
                                                </div>
                                            </div>
											
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Harga Satuan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="harga_satuan" id="cabang" >
                                                </div>
                                            </div>
											-->
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Potongan Penjualan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="potongan_penjualan" id="cabang" >
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Jumlah</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="jumlah" id="cabang" >
                                                </div>
                                            </div>
                                        </div>
                                        
                                    </div>
                                    <div class="form-actions">
                                        <button type="submit" class="btn btn-primary">Submit</button>
                                        <a type="reset" class="btn" href="<?php echo base_url() ?>penj">Cancel</a>
                                    </div>
                                    </fieldset>
                                </form>
								
                                
								
                                <?php } ?>
                            </div>
                        </div>
                        <!--/span-->
                    </div>
					
                    <?php
                    if (empty($penjualan)){
                        echo "tidak ada data";
                    } 
                    else {
                    
                    ?>
                    <div class="row-fluid sortable">
                        <div class="box span12">
                            <div class="box-content">
                                <table class="table table-striped table-bordered bootstrap-datatable datatable">
                                    <thead>
                                        <tr>
                                            <th>Nomer Penjualan</th>
                                            <th>Tanggal Penjualan</th>
                                            <th>No Pengiriman</th>
                                            <th>Nama</th>
                                            <th>Alamat</th>
                                            <th>Karyawan</th>
											<th>Jenis Barang</th>
											<th>Jenis Pembayaran</th>
											<th>Angsuran</th>
											<th>Kuantitas</th>
											<th>Harga Satuan</th>
											<th>Jumlah</th>
											<th>Potongan Penjualan</th>
											<th>Validasi Penjualan</th>
                                        </tr>
                                    </thead>
                                    
                                    <tbody>
                                        <?php
                                    foreach ($penjualan as $row) {
                                    ?>
                                        <tr>
                                            <td><?=$row['no_penjualan']?></td>
                                            <td><?=$row['tanggal']?></td>
                                            <td><?=$row['no_pengiriman']?></td>
                                            <td><?=$row['nama']?></td>
                                            <td><?=$row['alamat']?></td>
											<td><?=$row['karyawan']?></td>
											<td><?=$row['jenis_barang']?></td>
											<td><?=$row['jenis_pembayaran']?></td>
											<td><?=$row['angsuran']?></td>
											<td><?=$row['kuantitas']?></td>
											<td><?=$row['harga_satuan']?></td>
											<td><?=$row['potongan_penjualan']?></td>
											<td><?=$row['jumlah']?></td>
                                            <td class="center">
											<? if(false){
											echo 'OK';
											}
											 else{ ?>
                                                <a class="btn btn-info" href="<?php echo base_url()?>penj/validate/<?=$row['no_penjualan']?>">
                                                    <i class="icon-edit icon-white"></i>  
                                                    Validasi                                            
                                                </a>
                                               <? } ?>
                                            </td>
                                        </tr>
                                        <?php
                                        } 
                                        ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <!--/span-->
                    </div>
                    <?php 
                }
                    ?>
                    <!--/row-->
                    <!-- content ends -->
                </div>
                <!--/#content.span10-->
